package com.gejingyu.spring.di;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestBook {

    public static void main(String[] args) {
        ApplicationContext context
                = new ClassPathXmlApplicationContext("beanDI.xml");
//        Book book = (Book) context.getBean("book");
//        System.out.println(book);

        Book bookCon = (Book) context.getBean("bookCon");
        System.out.println(bookCon);
    }
}
